package com.example.firstproject.exception;

import com.example.firstproject.common.WrapMapper;
import com.example.firstproject.common.Wrapper;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @Author: lihua
 * @Date: 2024/4/26 09:55
 * @Version: v1.0.0
 * @Description:
 **/

@RestControllerAdvice
public class GlobalExceptionHandler {
    

    @ExceptionHandler(Exception.class)
    public Wrapper globeException(Exception e){
        e.printStackTrace();
        return WrapMapper.error("全局");
    }


}
